package beanAction;

import java.util.ArrayList;
import java.util.Date;

import packhib.Employe;

import com.opensymphony.xwork2.ActionSupport;

public class AjouterEmplAction extends ActionSupport{
	
	private static final long serialVersionUID = 1L;
	private int matricule;
	private int idEquipe;
	private String nom;
	private String Prenom;
	private String cnss;
	private String cin;
	private String adresse;
	private String sf;
	private int nbrEnfant;
	private Date dateE;
	private String typeContrat;
	
	private String statut;
	private ArrayList<String> statutList;
	
	
	private String poste;
	
	private Date dateS;
	private Short actif;
	
	
	public Short getActif() {
		return actif;
	}
	public void setActif(Short actif) {
		this.actif = actif;
	}
	public String getAdresse() {
		return adresse;
	}
	public void setAdresse(String adresse) {
		this.adresse = adresse;
	}
	public String getCin() {
		return cin;
	}
	public void setCin(String cin) {
		this.cin = cin;
	}
	public String getCnss() {
		return cnss;
	}
	public void setCnss(String cnss) {
		this.cnss = cnss;
	}
	public Date getDateE() {
		return dateE;
	}
	public void setDateE(Date dateE) {
		this.dateE = dateE;
	}
	public Date getDateS() {
		return dateS;
	}
	public void setDateS(Date dateS) {
		this.dateS = dateS;
	}
	public int getMatricule() {
		return matricule;
	}
	public void setMatricule(int matricule) {
		this.matricule = matricule;
	}
	public int getNbrEnfant() {
		return nbrEnfant;
	}
	public void setNbrEnfant(int nbrEnfant) {
		this.nbrEnfant = nbrEnfant;
	}
	public String getNom() {
		return nom;
	}
	public void setNom(String nom) {
		this.nom = nom;
	}
	public String getPoste() {
		return poste;
	}
	public void setPoste(String poste) {
		this.poste = poste;
	}
	public String getSf() {
		return sf;
	}
	public void setSf(String sf) {
		this.sf = sf;
	}
	public String getStatut() {
		return statut;
	}
	public void setStatut(String statut) {
		this.statut = statut;
	}
	public String getTypeContrat() {
		return typeContrat;
	}
	public void setTypeContrat(String typeContrat) {
		this.typeContrat = typeContrat;
	}
	public ArrayList<String> getStatutList() {
		return statutList;
	}
	public void setStatutList(ArrayList<String> statutList) {
		this.statutList = statutList;
	}
	public String getPrenom() {
		return Prenom;
	}
	public void setPrenom(String prenom) {
		Prenom = prenom;
	}
	public int getIdEquipe() {
		return idEquipe;
	}
	public void setIdEquipe(int idEquipe) {
		this.idEquipe = idEquipe;
	}
	
	public String populate() {
		
		       statutList = new ArrayList<String>();
		       statutList.add("Frai direct");
		       statutList.add("ouvrier");
		       statutList.add("chef d'equipe");
		       System.out.println("uuuuuuuuuuuuuuuuuuu");
		       return "sslect";
		       
		
	}
	
	public String execute() {
		        return SUCCESS;
		    }
	
	
	public String enregistrerEmployer()
	{
	 Employe emply=new Employe();
	 emply.setAdresse(getAdresse());
	 emply.setCin(getCin());
	 emply.setCnss(getCnss());
	 emply.setDateE(getDateE());
	 emply.setDateS(getDateS());
	 emply.setMatricule(getMatricule());
	 emply.setNbrEfant(getNbrEnfant());
	 emply.setNom(getNom());
	 emply.setPrenom(getPrenom());
	 emply.setSf(getSf());
	 emply.setStatut(getStatut());
	 emply.setTypeContrat(getTypeContrat());
	 emply.setActif(getActif());
	 emply.setIdEquipe(getIdEquipe());	
	}
}
